$aujourdhui = date("d/m/Y"); $montab = explode ( "/" , $aujourdhui ) ; $mmois = $montab[1]; $mannee = $montab[2]; $aujourdhui = $mannee . $mmois; $reqZ= "SELECT ID_CPT FROM CTPB WHERE DATE = '$aujourdhui' AND URL LIKE '$lienvpub%'"; $resultZ = mysql_query($reqZ); $cptZ = mysql_num_rows($resultZ); $rowZ = mysql_fetch_array($resultZ); $id_cpt = $rowZ['ID_CPT']; if ($cptZ == 0) { $req2 = "INSERT INTO CTPB (DATE,URL,COMPTEUR) VALUES ('$aujourdhui','$lienvpub','1')"; mysql_query($req2); } else { $req2 = "UPDATE CTPB SET COMPTEUR = COMPTEUR + 1 WHERE ID_CPT = '$id_cpt'"; mysql_query($req2); } ?> $aujourdhui = date("d/m/Y"); $montab = explode ( "/" , $aujourdhui ) ; $mmois = $montab[1]; $mannee = $montab[2]; $aujourdhui = $mannee . $mmois; $reqZ= "SELECT ID_CPT FROM CTPB WHERE DATE = '$aujourdhui' AND URL LIKE '$lienvpub%'"; $resultZ = mysql_query($reqZ); $cptZ = mysql_num_rows($resultZ); $rowZ = mysql_fetch_array($resultZ); $id_cpt = $rowZ['ID_CPT']; if ($cptZ == 0) { $req2 = "INSERT INTO CTPB (DATE,URL,COMPTEUR) VALUES ('$aujourdhui','$lienvpub','1')"; mysql_query($req2); } else { $req2 = "UPDATE CTPB SET COMPTEUR = COMPTEUR + 1 WHERE ID_CPT = '$id_cpt'"; mysql_query($req2); } ?> $aujourdhui = date("d/m/Y"); $montab = explode ( "/" , $aujourdhui ) ; $mmois = $montab[1]; $mannee = $montab[2]; $aujourdhui = $mannee . $mmois; $reqZ= "SELECT ID_CPT FROM CTPB WHERE DATE = '$aujourdhui' AND URL LIKE '$lienvpub%'"; $resultZ = mysql_query($reqZ); $cptZ = mysql_num_rows($resultZ); $rowZ = mysql_fetch_array($resultZ); $id_cpt = $rowZ['ID_CPT']; if ($cptZ == 0) { $req2 = "INSERT INTO CTPB (DATE,URL,COMPTEUR) VALUES ('$aujourdhui','$lienvpub','1')"; mysql_query($req2); } else { $req2 = "UPDATE CTPB SET COMPTEUR = COMPTEUR + 1 WHERE ID_CPT = '$id_cpt'"; mysql_query($req2); } ?> |
|